import 'package:FiduMart/generated/json/base/json_field.dart';
import 'package:FiduMart/generated/json/currencyrank_list_entity.g.dart';
import 'dart:convert';
export 'package:FiduMart/generated/json/currencyrank_list_entity.g.dart';

@JsonSerializable()
class CurrencyrankListEntity {
	@JSONField(name: "last_id")
	int? lastId;
	List<CurrencyrankListList>? list;
	String? pages;
	@JSONField(name: "total_page")
	int? totalPage;
	@JSONField(name: "total_count")
	int? totalCount;
	@JSONField(name: "total_count_for_rank")
	int? totalCountForRank;
	@JSONField(name: "total_count_for_norank")
	int? totalCountForNorank;
	@JSONField(name: "total_page_for_rank")
	int? totalPageForRank;
	@JSONField(name: "total_page_for_norank")
	int? totalPageForNorank;

	CurrencyrankListEntity();

	factory CurrencyrankListEntity.fromJson(Map<String, dynamic> json) => $CurrencyrankListEntityFromJson(json);

	Map<String, dynamic> toJson() => $CurrencyrankListEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class CurrencyrankListList {
	int? id;
	@JSONField(name: "currency_id")
	int? currencyId;
	String? name;
	String? symbol;
	int? rank;
	String? logo;
	@JSONField(name: "market_id")
	int? marketId;
	@JSONField(name: "market_name")
	String? marketName;
	@JSONField(name: "com_id")
	String? comId;
	String? pair;
	String? currency;
	String? anchor;
	String? price;
	@JSONField(name: "price_cny")
	String? priceCny;
	@JSONField(name: "price_usd")
	String? priceUsd;
	@JSONField(name: "volume_24h")
	double? volume24h;
	@JSONField(name: "volume_24h_usd")
	String? volume24hUsd;
	@JSONField(name: "volume_24h_from")
	int? volume24hFrom;
	@JSONField(name: "volume_24h_to")
	dynamic volume24hTo;
	@JSONField(name: "percent_change_utc0")
	double? percentChangeUtc0;
	@JSONField(name: "percent_change_utc8")
	double? percentChangeUtc8;
	@JSONField(name: "percent_change_24h")
	double? percentChange24h;
	@JSONField(name: "percent_change_7d")
	double? percentChange7d;
	@JSONField(name: "price_updated_at")
	int? priceUpdatedAt;
	@JSONField(name: "tv_symbol")
	dynamic tvSymbol;
	@JSONField(name: "cc_kline")
	int? ccKline;
	@JSONField(name: "kline_enabled")
	int? klineEnabled;
	@JSONField(name: "kline_source")
	String? klineSource;
	@JSONField(name: "market_cap_usd")
	String? marketCapUsd;
	String? alias;
	@JSONField(name: "market_alias")
	String? marketAlias;
	@JSONField(name: "available_supply")
	int? availableSupply;
	@JSONField(name: "max_supply")
	int? maxSupply;
	@JSONField(name: "total_supply")
	int? totalSupply;
	@JSONField(name: "is_new")
	int? isNew;
	int? enabled;
	@JSONField(name: "can_trade_in_okx")
	int? canTradeInOkx;
	@JSONField(name: "is_leading_currency")
	int? isLeadingCurrency;
	@JSONField(name: "price_display_cny")
	String? priceDisplayCny;
	@JSONField(name: "market_cap_display")
	String? marketCapDisplay;
	@JSONField(name: "market_cap_display_cny")
	String? marketCapDisplayCny;
	@JSONField(name: "percent_change_display")
	String? percentChangeDisplay;
	@JSONField(name: "is_favorite")
	bool? isFavorite;
	@JSONField(name: "seven_day")
	int? sevenDay;
	@JSONField(name: "turnover_rate")
	String? turnoverRate;
	@JSONField(name: "turnover_rate_raw")
	String? turnoverRateRaw;
	@JSONField(name: "value_change_kline_7d")
	double? valueChangeKline7d;
	List<dynamic>? kline;
	@JSONField(name: "line_data")
	List<int>? lineData;

	CurrencyrankListList();

	factory CurrencyrankListList.fromJson(Map<String, dynamic> json) => $CurrencyrankListListFromJson(json);

	Map<String, dynamic> toJson() => $CurrencyrankListListToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}